#ifndef __SPEEXENCODER_AGORA_H__
#define __SPEEXENCODER_AGORA_H__

#include "IEncoder.h"

class SpeexEncoder : public IEncoder
{
public:
	SpeexEncoder(int quality);
	~SpeexEncoder();
	virtual void Encode(IBuffer *bufferIn, IBuffer *bufferOut, unsigned short frequence);
	virtual void Decode(void *data, unsigned int size, IBuffer *bufferOut, unsigned short frequence);
	virtual void SetQuality(int quality);
	virtual int GetQuality(int quality);
private:
	enum DecoderSpeexMode
	{
		_SPEEX_NB = 0,
		_SPEEX_WB = 1,
		_SPEEX_UWB = 2

	};
	void *GetEncoder(unsigned short frequence);
	void *GetDecoder(unsigned short frequence);
	void *_NBencoderState;
	void *_WBencoderState;
	void *_UWBencoderState;
	void *_NBdecoderState;
	void *_WBdecoderState;
	void *_UWBdecoderState;
	int	 _quality;
	char _mode;
};

#endif